<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style media="screen">
  .box{
    position: relative;
    height: 200px;
    height: 300px;
  }
    #files{
      opacity: 0;
      width: 200px;
      height: 300px;
      position: absolute;
      left: 0;
    }
  </style>
</head>
<body>
  <div class="box">
    <img src="upload1.png" alt="" width="200" height="300" id="imgs">
    <input type="file" id="files" onchange="change()">
  </div>
  <script type="text/javascript">
    function change(){
      var file = document.getElementById('files');
      var img = document.getElementById('imgs')
      var files = file.files[0]
      var reader = new FileReader();
         reader.readAsDataURL(files);
         reader.onload = function(e){
          var pic = document.getElementById("imgs");
          pic.src=this.result;
         }
    }
  </script>
</body>
</html>
